<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="referrer" content="no-referrer" />
    <title>椭球地图核心功能测试</title>
    <style>
        body {
            position: absolute;
            margin: 0;
            width: 100%;
            height: 100%;
        }

        #mapContainer {
            left: 0px;
            top: 0px;
            width: 100%;
            height: 100%;
            float: left;
        }
    </style>
</head>

<body>
    <div id="mapContainer" style="position: relative;"></div>
</body>
<script src='/GiswayEngine.js'></script>
<script type="text/javascript">
    let geodetic3D1 = new GE.Geodetic3D(118.76769049871781, 31.828401267358743, 3000);
    let geodetic3D2 = new GE.Geodetic3D(119.76769049871781, 31.888401267358743, 3000);

    let ellipsoidCenter = new GE.three.Vector3(0, 0, 0);
    let ellipsoidRadius = new GE.three.Vector3(6378137.0, 6378137.0, 6356752.3142451793);
    let ellipsoid = new GE.Ellipsoid(ellipsoidCenter, ellipsoidRadius);  //new GE.three.Vector3(1, 1, 0.996647189335224)
    let ecefPoint1 = ellipsoid.toEcef(geodetic3D1);
    console.log(ecefPoint1);

    let ecefPoint2 = ellipsoid.toEcef(geodetic3D2);
    console.log(ecefPoint2);

    let curvePoints = ellipsoid.computeCurve(ecefPoint1, ecefPoint2, Math.PI/1000);
    console.log(curvePoints);

    // let testPoint1 = new GE.three.Vector3(0.587637341255248, 0.493086276313276, 0.639369391438314);
    // let testPoint2 = new GE.three.Vector3(-0.433375501286102, 0.750628386983161, -0.497068930219511);
    //  let curvePoints2 = ellipsoid.computeCurve(testPoint1, testPoint2, 0.087266462599716474);
    // console.log(curvePoints2);

    //0.587637341255248, 0.493086276313276, 0.639369391438314
    //-0.433375501286102, 0.750628386983161, -0.497068930219511

    // geodetic3D1 = ellipsoid.toGeography(ecefPoint1);
    // console.log(geodetic3D1);

    // ecefPoint1 = ellipsoid.toEcef(geodetic3D1);
    // console.log(ecefPoint1);

    // geodetic3D1 = ellipsoid.toGeography(ecefPoint1);
    // console.log(geodetic3D1);

    

</script>

</html>